package com.jiawa.wiki.req;

import lombok.Data;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;

@Data
@ToString
public class UserSaveReq {
    private Long id;

    private String loginName;
    @NotNull(message = "名字不能为空")
    //@NotEmpty 校验null和""  @NotNUll 校验null
    private String name;
    @NotNull(message = "密码不能为空")
    @Length(max = 32,min = 6)
    private String password;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
}
